import axios from "axios";

export const RollBackFile = async (taskName, fileName, targetVersion) => {
    try {
        const response = await axios.post('/api/resources/rollback', null, {
            params: {
                taskName,
                fileName,
                targetVersion
            }
        });
        return response.data;
    } catch (error) {
        console.error('文件回滚时出错:', error);
        throw error;
    }
};
